﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="XmlTabConfigElement.cs" company="" />
// <summary>
//   Configuration element for an XML tab page.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Xompare.Configuration
{
    using System.Configuration;

    /// <summary>
    /// Configuration element for an XML tab page.
    /// </summary>
    public class XmlTabConfigElement : ConfigurationElement
    {
        public const string CElementName = "XmlTab";

        #region Attributes field names

        private const string c_viewXmlSyntax = "viewXmlSyntax";

        #endregion

        public override bool IsReadOnly()
        {
            return false;
        }

        /// <summary>
        /// Gets or sets whether to view the XML information in XML syntax.
        /// </summary>
        [ConfigurationProperty(c_viewXmlSyntax, IsRequired = true)]
        public bool ViewXmlSyntax
        {
            get
            {
                return (bool)this[c_viewXmlSyntax];
            }

            set
            {
                this[c_viewXmlSyntax] = value;
            }
        }
    }
}
